import React from 'react'

import NullComFuncImg from 'images/dashboard/null-comFunc.jpg'
import NullActiveDocImg from 'images/dashboard/null-activeDoc.jpg'
import NullWaitPayImg from 'images/dashboard/null-waitPay.jpg'
import NullAccountImg from 'images/dashboard/null-account.jpg'
import NullBusinessCardImg from 'images/dashboard/null-businessCard.jpg'
import NullDataImg from 'images/dashboard/null-data.png'
import UnOpenedImg from 'images/dashboard/unopened.jpg'
import NullWaitApproveImg from 'images/dashboard/null-waitApprove.png'

class NullCard extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      NullImg: {
        'commonFunc': NullComFuncImg,
        'dynamicDoc': NullActiveDocImg,
        'pendingRepay': NullWaitPayImg,
        'accountBook': NullAccountImg,
        'businessCard': NullBusinessCardImg,
        'report': NullDataImg,
        'unOpened': UnOpenedImg,
        'waitApprove': NullWaitApproveImg
      }
    }
  }

  render() {
    const {NullImg} = this.state;
    const {imgType, message} = this.props;
    return (
      <div className="default-null-card">
        <p><img src={NullImg[imgType]}/></p>
        <p className={"default-null-card-title"} dangerouslySetInnerHTML={{__html: message}} />
      </div>
    )
  }
}


NullCard.propTypes = {
  imgType: React.PropTypes.string.isRequired, //图片类型
  message: React.PropTypes.string.isRequired, //提示语句
};

NullCard.defaultProps={
};

export default NullCard
